<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "head.ftl" />
</head>
<body>
<div class="body-box">
<div class="rhead">
	<div class="rpos">当前位置: 内容管理 - 文章列表</div>
	<form class="ropt">
		<input type="button" value="添加" onclick="location.href='${st.domain}/article/addOrEdit'"/>
		<input type="button" value="生成HTML" onclick="location.href='${st.domain}/article/generate'"/>
	</form>
	<div class="clear"></div>
</div>
<div style="padding:10px;">
	<div>
	分类:<input type="text" id="categoryName" value="${article.category.name}"><a href="javascript:;" id="clearCat" style="margin-left:-25px">清空</a>&nbsp;&nbsp;
	<input type="hidden" id="categoryCatId" value="${article.category.catId}">
	<input type="text" id="searchWord" value="${searchWord}">
	<input type="button" id="searchBt" value="查找">
	</div>
	<div class="clear"></div>
</div>
<form id="tableForm" method="post">
<input type="hidden" name="pageNo" value="1"/>
<table class="pn-ltable" style="" width="100%" cellspacing="1" cellpadding="0" border="0">
<thead class="pn-lthead"><tr>
	<th width="20"><input type='checkbox' onclick='Pn.checkbox("ids",this.checked)'/></th>
	<th>ID</th>
	<th>标题</th>
	<th>类别</th>
	<th>更新时间</th>
	<th>操作选项</th></tr></thead>
<tbody  class="pn-ltbody">
<#list articleList as article>
<tr>
	<td><input type='checkbox' name='ids' value='1'/></td>
	<td>${article.articleId}</td>
	<td>${article.title}</td>
	<td>${article.category.category.category.category.name}&nbsp;${article.category.category.category.name}&nbsp;${article.category.category.name}&nbsp;${article.category.name}</td>
	<td>${article.updateTime?number_to_datetime}</td>
	<td align="center"><a href="${st.domain}/article/addOrEdit?articleId=${article.articleId}" class="pn-opt">修改</a></td>
</tr>
</#list>
</tbody>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" class="pn-sp">
	<div id="pageLink" class="pageLinks">${pageLink.linkString}</div>
</td></tr></table>
</form>
</div>
</body>
<script type="text/javascript">
// 分类选择
$("#categoryName").categoryFloatPanel({
	type: 1,
	onSelect: function(treeId, treeNode) {
		$("#categoryCatId").val(treeNode.catId);
		$("#categoryName").val(treeNode.name);
	}
});
// 事件:清空
$("#clearCat").click(function() {
	$("#categoryCatId").val("");
	$("#categoryName").val("");
});
// 事件:查找
$("#searchBt").click(function(){
	pageReload.addParam("nowPage", 1);
	pageReload.addParam("category.catId", $("#categoryCatId").val());
	pageReload.addParam("category.name", $("#categoryName").val());
	pageReload.addParam("searchWord", $("#searchWord").val());
	pageReload.reload();
});
</script>
</html>